<%@ page contentType="text/html; charset=utf-8" language="java"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>款式选择-男装</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" />
<script>
	function checkstyle() {
		var styleredio = document.getElementsByName("radiobutton");
		for ( var i = 0; i < styleredio.length; i++) {
			if (styleredio[i].checked == true) {
				var redioid = i;
				document.getElementById("redioid").value = i;
				var stylename = styleredio[i].value;
				document.getElementById("styleName").value = stylename;
				return true;
			}
		}
		alert("请选择服装款式！");
		return false;
	}
	function init() {
		var radioid='<%=session.getAttribute("redioid")%>';
		if (radioid != '') {
			var styleredio = document.getElementsByName("radiobutton");
			styleredio[radioid].checked = true;
		}
	}
	function rediocheck() {
		checkstyle();
		var styleredio = document.getElementsByName("radiobutton");
		for ( var i = 0; i < styleredio.length; i++) {
			if (styleredio[i].checked == true) {
				document.getElementById("form1").submit();
				return true;
			}
		}
		alert("请选择服装款式！");
		return false;
	}
</script>
</head>
<body background="../images/bg/bg.jpg" onload="init()">
	<div class="TitleDiv">
		<font class="TitleCharFont">我要买</font>

	</div>
			<div class="TitleDiv">
		</div>
	<div class="TitleDiv">
		<br /> <span align="center" style="width: 50%"> <span>
				<a href="../view/StyleMan.jsp" style="cursor: hand; cursor: pointer;"><input name="styleChooseButton"
					type="button" class="TitleSelectButton" id="styleChooseButton"
					value="款式选择" /></a>
		</span> <span> <a href="../view/SizeChoose.jsp" style="cursor: hand; cursor: pointer;"><input
					name="sizeChooseButton" type="button" class="TitleNoSelectButton"
					id="sizeChooseButton" value="尺寸选择" /></a>
		</span> <span> <a href="../view/Lining.jsp" style="cursor: hand; cursor: pointer;"><input
					name="liningChooseButton" type="button" class="TitleNoSelectButton"
					id="liningChooseButton" value="面料选择" /></a>
		</span> <span> <a href="../view/AccessoryChoose.jsp" style="cursor: hand; cursor: pointer;"><input
					name="accessoryChooseButton" type="button"
					class="TitleNoSelectButton" id="accessoryChooseButton" value="辅料选择" /></a>
		</span> <span><a href="../view/PriceSheet.jsp" style="cursor: hand; cursor: pointer;"><input
					name="priceSheetButton" type="button" class="TitleNoSelectButton"
					id="priceSheetButton" value="报价单" /> </a> </span>
		</span>
	</div>
	<div class="ContentDiv">
		<br /> <span align="center" style="width: 50%"> <span><a
				href="../view/StyleMan.jsp" style="cursor: hand; cursor: pointer;"><input name="manButton" type="button"
					class="ContentButton" id="manButton" value="男装" /></a></span> <span><a
				href="../view/Stylewoman.jsp" style="cursor: hand; cursor: pointer;"><input name="womanButton"
					type="button" class="ContentButton" id="womanButton" value="女装" /></a></span>
		</span>

	</div>
	<form id="form1" name="form1" method="post" action="styleAction">

		<input type="hidden" name="styleName" id="styleName" value="" /> <input
			type="hidden" name="redioid" id="redioid" value="" />
		<div class="DetailDiv">

			<table border="0">

				<tr>
					<td width="111" class="Td"><strong class="StyleChareFont">上装</strong></td>
					<td width="107" class="Td">&nbsp;</td>
					<td width="151" class="Td">&nbsp;</td>
					<td width="122" class="Td">&nbsp;</td>
					<td width="62" class="Td">&nbsp;</td>
				</tr>
				<tr>
					<td class="Td"><input type="radio" name="radiobutton"
						id="xifu" value="西服_../images/dress/man/up/xifu.png" onclick="checkstyle();" checked="checked"/>男-西服 <img
						src="../images/dress/man/up/xifu.png" width="104" height="119"/></td>
					<td class="Td"><input type="radio" name="radiobutton"
						value="radiobutton" onclick="checkstyle();" />男-衬衫 <img
						src="../images/dress/man/up/chenshan.png" width="104" height="119" /></td>

					<td class="Td"><input type="radio" name="radiobutton"
						value="radiobutton" onclick="checkstyle();" />男-T恤 <img
						src="../images/dress/man/up/SHIRT1.png" width="104" height="119"
						class="Image" /></td>
					<td class="Td"><input type="radio" name="radiobutton"
						value="radiobutton" onclick="checkstyle();" />男-夹克 <img
						src="../images/dress/man/up/jiake.png" width="104" height="119"
						class="Image" /></td>
				</tr>
				<tr>
					<td class="Td"><strong class="StyleChareFont">下装</strong></td>
					<td class="Td">&nbsp;</td>
					<td class="Td">&nbsp;</td>
					<td class="Td">&nbsp;</td>
					<td class="Td">&nbsp;</td>
				</tr>
				<tr>
					<td class="Td"><label> <input type="radio"
							name="radiobutton" value="radiobutton" onclick="checkstyle();" />男-短裤
							<img src="../images/dress/man/down/duanku.png" width="104"
							height="119" /></label></td>
					<td class="Td"><label> <input type="radio"
							name="radiobutton" value="radiobutton" onclick="checkstyle();" />男-长裤
							<img src="../images/dress/man/down/changku.png" width="104"
							height="119" /></label></td>
					<td class="Td">&nbsp;</td>
					<td class="Td">&nbsp;</td>
					<td class="Td">&nbsp;</td>
				</tr>
			</table>

		</div>
		<div class="NextDiv">
			<input name="getSizeButton" type="button" class="NextButton"
				id="getSizeButton" value="下一步" onclick="rediocheck()" />
		</div>
	</form>
</body>
</html>